package com.onekbase.demo.mybatis;

import com.onekbase.demo.mybatis.config.SpringConfig;
import com.onekbase.demo.mybatis.service.DemoService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringAnnotationMain {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        DemoService s = context.getBean("demoService", DemoService.class);
        s.hello();
    }
}
